package cn.edu.neusoft.wuguangsheng.market.model;

import cn.edu.neusoft.wuguangsheng.market.bean.LoginBean;
import cn.edu.neusoft.wuguangsheng.market.iface.LoginIface;
import cn.edu.neusoft.wuguangsheng.market.listener.TListener;
import cn.edu.neusoft.wuguangsheng.market.service.AllService;
import retrofit2.Call;
import retrofit2.Retrofit;

/**
 * Created by little on 2018/4/4.
 */

public class LoginModel extends RetrofitBaseModel implements LoginIface<LoginBean> {

        private AllService allService;
        private Retrofit retrofit;
        public LoginModel(){
            retrofit=getRetrofit();
            allService=getAllService();
        }

    @Override
    public void getUser(String username, String password, TListener<LoginBean> tListener) {
        Call<LoginBean> call= allService.getUser(username,password);
        callenqueue(call,tListener);
    }
}
